Function.prototype.yzApply = function (thisArg, argArray) {
  const fn = this;
  thisArg = (thisArg !== null && thisArg !== undefined) ? Object(thisArg) : window;
  const symbol = Symbol('fn');
  thisArg[symbol] = fn;
  const result = thisArg[symbol](...argArray);
  delete thisArg[symbol];
  return result;
}
Function.prototype.yzCall = function (thisArg, ...args) {
  const fn = this;
  thisArg = (thisArg !== null && thisArg !== undefined) ? Object(thisArg) : window;
  const symbol = Symbol('fn');
  thisArg[symbol] = fn;
  const result = thisArg[symbol](...args);
  delete thisArg[symbol];
  return result;
}
Function.prototype.yzBind = function (thisArg, ...args) {
  const fn = this;
  thisArg = (thisArg !== null && thisArg !== undefined) ? Object(thisArg) : window;

  function proxy(...args2) {
    const symbol = Symbol('fn');
    thisArg[symbol] = fn;
    const result = thisArg[symbol](...args, ...args2);
    delete thisArg[symbol];
    return result;
  }
  return proxy;
}

function sum(num1, num2, num3) {
  console.log(num1 + num2 + num3, this);
}
// sum.yzbind("aaa", 10)(20, 30);
sum.yzApply("aaa", [10, 20, 30]);
sum.yzCall("bbb", 20, 30, 40);
sum.yzBind("ccc").yzBind("abc")(30, 40, 50);
sum.bind("111").bind("222")(10, 20, 20);